//teacher.js
//获取应用实例
var app = getApp();
var config = require("../../config.js");
Page({
  data: {
    trimg: '../../image/teachermanage.png',
    teacherList: []
  },
  onLoad: function (options) {
    this.getList();
  },

  getList() {
    wx.request({
      url: `${config.baseUri}/teacher/${config.userId}/page`,
      method: 'GET',
      success: (res) => {
        console.log(res),
          this.setData({
            teacherList: [...this.data.teacherList, ...res.data.data.records]
          })
      }
    })
  }

})